using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._RasterCreation
{
    /// <summary>
    /// <para>Create Constant Raster</para>
    /// <para>Creates a raster of a constant value within the extent and cell size of the analysis window.</para>
    /// <para>在分析窗口的范围和像元大小内创建常量值的栅格。</para>
    /// </summary>    
    [DisplayName("Create Constant Raster")]
    public class CreateConstantRaster : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateConstantRaster()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para>The output raster for which each cell will have the specified constant value.</para>
        /// <para>每个像元将具有指定常量值的输出栅格。</para>
        /// </param>
        /// <param name="_constant_value">
        /// <para>Constant value</para>
        /// <para>The constant value with which to populate all the cells in the output raster.</para>
        /// <para>用于填充输出栅格中所有像元的常量值。</para>
        /// </param>
        public CreateConstantRaster(object _out_raster, double? _constant_value)
        {
            this._out_raster = _out_raster;
            this._constant_value = _constant_value;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Create Constant Raster";

        public override string CallName => "sa.CreateConstantRaster";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_out_raster, _constant_value, _data_type.GetGPValue(), _cell_size, _extent];

        /// <summary>
        /// <para>Output raster</para>
        /// <para>The output raster for which each cell will have the specified constant value.</para>
        /// <para>每个像元将具有指定常量值的输出栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Constant value</para>
        /// <para>The constant value with which to populate all the cells in the output raster.</para>
        /// <para>用于填充输出栅格中所有像元的常量值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Constant value")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public double? _constant_value { get; set; }


        /// <summary>
        /// <para>Output data type</para>
        /// <para><xdoc>
        ///   <para>Data type of the output raster dataset.</para>
        ///   <bulletList>
        ///     <bullet_item>Integer—An integer raster will be created.</bullet_item><para/>
        ///     <bullet_item>Float—A floating-point raster will be created.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>If the specified data type is Float, the values of the cells in the output raster will only be accurate to the constant value of 7 decimal places, regardless of the output format.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出栅格数据集的数据类型。</para>
        ///   <bulletList>
        ///     <bullet_item>整数—将创建整数栅格。</bullet_item><para/>
        ///     <bullet_item>浮点型—将创建浮点栅格。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>如果指定的数据类型为浮点数，则无论输出格式如何，输出栅格中的像元值将仅精确到小数点后 7 位的常量值。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output data type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _data_type_value _data_type { get; set; } = _data_type_value._INTEGER;

        public enum _data_type_value
        {
            /// <summary>
            /// <para>Integer</para>
            /// <para>Integer—An integer raster will be created.</para>
            /// <para>整数—将创建整数栅格。</para>
            /// </summary>
            [Description("Integer")]
            [GPEnumValue("INTEGER")]
            _INTEGER,

            /// <summary>
            /// <para>Float</para>
            /// <para>Float—A floating-point raster will be created.</para>
            /// <para>浮点型—将创建浮点栅格。</para>
            /// </summary>
            [Description("Float")]
            [GPEnumValue("FLOAT")]
            _FLOAT,

        }

        /// <summary>
        /// <para>Output cell size</para>
        /// <para><xdoc>
        ///   <para>The cell size of the output raster that will be created.</para>
        ///   <para>This parameter can be defined by a numeric value or obtained from an existing raster dataset. If the cell size hasn't been explicitly specified as the parameter value, the environment cell size value will be used if specified; otherwise, additional rules will be used to calculate it from the other inputs. See the usage section for more detail.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将创建的输出栅格的像元大小。</para>
        ///   <para>此参数可以由数值定义，也可以从现有栅格数据集中获取。如果尚未将像元大小显式指定为参数值，则在指定的情况下将使用环境像元大小值;否则，将使用其他规则从其他输入计算它。有关详细信息，请参阅用法部分。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output cell size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _cell_size { get; set; } = null;


        /// <summary>
        /// <para>Output extent</para>
        /// <para><xdoc>
        ///   <para>The extent for the output raster dataset.</para>
        ///   <para>The extent will be the value in the environment if specifically set. If not specifically set, the default is 0, 0, 250, 250.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出栅格数据集的范围。</para>
        ///   <para>如果专门设置了范围，则范围将是环境中的值。如果未特别设置，则默认值为 0、0、250、250。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _extent { get; set; } = null;


        public CreateConstantRaster SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}